package com.ftg.learn.chapter13;

import java.util.Arrays;
import java.util.List;
import java.util.stream.*;

/**
 * 测试
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/2/16 上午8:14
 */
public class Solution {

    public static void main(String[] args) {
//        int[] as = new int[]{23, 1, 345, 6, 7, 9};
//        int a = 0;
//        for (int i : as) {
//            a ^= i;
//        }
//        System.out.println(a);
//        int b = a & (~a + 1);
//        System.out.println(b);
//        System.out.println(-56 & 56);
//        System.out.println(Integer.toBinaryString(-56));
//        System.out.println(Integer.toBinaryString(56));
//        System.out.println(Integer.toBinaryString(~56));
//        System.out.println(-4^5);
//
//        DoubleStream.of(1,2,3).average();
//        IntStream.of(1,2,3).average();
//        LongStream.of(1,2,3).average();
//
//        boolean c = Stream.of(5, 3, 6, 1)
////                 .allMatch(e -> e > 0); // allMatch: 元素是否全部满足条件
//                 .anyMatch(e -> e > 5); // anyMatch: 元素是否任意有一个满足条件
////                .noneMatch(e -> e < 0); // noneMatch: 元素是否全部不满足条件
//        System.out.println("b = " + c);
//
//        Stream.of(5, 3, 6, 1).collect(Collectors.groupingBy(x->x>2)).forEach((x,y)-> System.out.printf("key:%s\tvalue:%s\b",x, y.toString()));
////        //求平均值
////        double b = stuStream.filter(x->x.getName().startWith("张")).collect(Collectors.averagingInt(s -> s.getSocre()));
//

        int team = (int)(Math.random() * 9)+1;

        System.out.println(team);


    }

}
